package cn.tedu.csmall.product.mapper;

import cn.tedu.csmall.product.pojo.entity.Picture;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class PictureMapperTets {
   @Autowired
  PictureMapper mapper;
   @Test
    void testInsert(){
       Picture picture=new Picture();
       picture.setAlbumId(2L);
       picture.setUrl("模拟数据:小米5手机图片");
       picture.setWidth(1024);
       picture.setHeight(768);
       picture.setIsCover(0);
       picture.setSort(0);
       int row=mapper.insert(picture);
       System.out.println("row = "+row);
   }
   @Test
   void testdeleteById(){
      Long id=11L;
      int row= mapper.deleteById(id);
      System.out.println("row = "+row);
   }
}
